#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;

const int N = 1e6 + 10, INF = 0x3f3f3f3f;

void solve()
{
    int n, m;
    while (cin >> n >> m) {
        vector<vector<int>> ma(n + 1, vector<int>(m + 1));
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                cin >> ma[i][j];
            }
        }

        bool f = true;
        for (int i = 1; i <= n; i++) {
            for (int j = i + 1; j <= n; j++) {
                int sum = 0;
                for (int k = 1; k <= m; k++) {
                    sum += abs(ma[i][k] - ma[j][k]);
                }
                if ((sum & 1) == 0) {
                    f = false;
                    break;
                }
            }
            if (f) break;
        }
        if (f == 0) cout << "No\n";
        else cout << "Yes\n";
    }
}

signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    int T = 1;
    //cin>>T;
    for (int i = 1;i <= T;i++) {
        solve();
    }
}